<link rel="stylesheet" href="templates/demo/form/css/demoForm.css"/>
<div class="pd14 vany_authority">
    <div class="vany_treeTable pd14" id="authority">
        <!--面包屑-->
        <div class="pb10" id="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item :to="{ path: '/' }">DEMO</el-breadcrumb-item>
                <el-breadcrumb-item>表单DEMO</el-breadcrumb-item>
            </el-breadcrumb>
            <i-favorite></i-favorite>
        </div>

        <div id="fromDemo">
            <div class="grid-content bg-purple" id="fromDemoContent">
                <el-form :model="demoForm" :rules="rules" ref="demoForm" label-width="140px" class="demo-ruleForm">
                    <el-form-item label="名称:" prop="name">
                        <el-input v-model="demoForm.name" placeholder="请输入名称"></el-input>
                    </el-form-item>
                    <el-form-item label="工厂:" prop="industry">
                        <el-select v-model="demoForm.industry" placeholder="请选择工厂">
                            <el-option v-for="item in industry" :key="item.value" :label="item.label"
                                       :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="活动时间:" prop="demoDate">
                        <el-date-picker type="date" placeholder="选择日期" v-model="demoForm.demoDate"
                                        style="width: 50%;"></el-date-picker>
                    </el-form-item>
                    <el-form-item label="即时配送:" prop="delivery">
                        <el-switch on-text="" off-text="" v-model="demoForm.delivery"></el-switch>
                    </el-form-item>
                    <el-form-item label="活动性质:" prop="type">
                        <el-checkbox-group v-model="demoForm.type">
                            <el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
                            <el-checkbox label="地推活动" name="type"></el-checkbox>
                            <el-checkbox label="线下主题活动" name="type"></el-checkbox>
                            <el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
                        </el-checkbox-group>
                    </el-form-item>
                    <el-form-item label="特殊资源:" prop="resource">
                        <el-radio-group v-model="demoForm.resource">
                            <el-radio label="1">线上品牌商赞助</el-radio>
                            <el-radio label="2">线下场地免费</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item label="备注:" prop="remark">
                        <el-input type="textarea" :rows="10" v-model="demoForm.remark"
                                  @input="descInput('remark')"></el-input>
                        <span class="fontNumber">{{demoForm.remarkCT}}</span>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="submitForm('demoForm')">确定</el-button>
                        <el-button type="primary" @click="resetForm('demoForm')">重置</el-button>
                        <el-button type="primary" @click="cancel('demoForm')">取消</el-button>
                        <el-button type="primary" @click="BatchImport">批量导入</el-button>
                    </el-form-item>
                </el-form>

                <!--提交信息-->
                <el-dialog title="提示" :visible.sync="dialogVisible" size="tiny" class="title_dialog">
                    <span>确定提交DEMO里的信息吗？</span>
                    <p>确定后将修改DEMO信息</p>
                    <span slot="footer" class="dialog-footer">
						<el-button type="primary" @click="tijiao(true)">确 定</el-button>
						<el-button @click="tijiao(false)">取 消</el-button>
					</span>
                </el-dialog>
            </div>
        </div>
        <!--批量导入-->
        <div id="BatchImport" class="BatchImport">
            <el-dialog :close-on-click-modal="false" :auto-upload="false" v-model="batchImportVisible" title="批量导入"
                       size="small" custom-class="border_dialog title_dialog ImportExcel">
                <el-form :label-position="labelPosition" :model="ruleForm" ref="ruleForm">
                    <el-upload ref="upload" :show-file-list="false" :auto-upload="false" drag :on-change="handleChange"
                               :on-success="handleSuccess" action="/" :data="form">
                        <div class="user_import" v-if="filename">
                            <i class="excel iconfont icon-excel"></i>
                            <div class="el-upload__text" v-text="filename"></div>
                        </div>
                        <div class="user_import" v-else>
                            <i class="iconfont icon-jia"></i>
                            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                        </div>
                        <div class="el-upload__tip" slot="tip">支持Excel格式</div>
                    </el-upload>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
                    <el-button class="el-button--ddd" @click="batchImportVisible = false">取消</el-button>
                </div>
            </el-dialog>
        </div>
    </div>
</div>
<script type="text/javascript" src="templates/demo/form/js/demoForm.js?ts=new Date().getTime()"></script>
<script type="text/javascript" src="templates/authority/common/js/moveline.js?ts=new Date().getTime()"></script>